Tokens

PDFCreator uses tokens to add variable content for several settings like filename, target folder or mail content.

For example you could automatically sort created invoices by adding the <DateTime> token to the target folder (Profile Settings -> Auto-Save):

MyInvoice<DateTime:yyyy-mm>

The token will set a folder for the year (with four digits) and the month (two digits) e.g. MyInvoice2014-10.

The following list explains all available tokens:

<PrintJobAuthor>

Inserts the name of the author, who launched the print job. (This is not necessarily the user currently logged in. That would be the token <UserName>.)

<Author>

Inserts the profile settings author template with replaced tokens.

<ClientComputer>

Inserts the computer name or IP address of the computer from which the print job was launched. This can also be used in the auto save directory to save directly to client computers (i.e. “\<ClientComputer>MyShare”).

<ComputerName>

Inserts the name of the computer.

<Counter>

A counter that counts the print jobs. This token is parameterizable. <Counter:Format>

Sample:

  • <Counter:000> Displays the number with 3 digits.

You will find a full list of parameters in the MSDN documentation: Custom Numeric Format Strings.

<DateTime>

Inserts the date and time at that the PDF is created. This token is parameterizable. <DateTime:Format>

Samples:

  • <DateTime:yyyy> Displays the year as a 4-digit number.
  • <DateTime:mmm> Displays the month as an abbreviation (e.g. Jan or Dec).

You will find a full list of parameters in the MSDN documentation User-Defined Date/Time Formats

<Environment>

Inserts any environment variable of your system. For example <Environment:OS> returning your operating system. This also includes variables from the Volatile Environment on Terminal Servers.

<InputFilename>

If <Title> contains a file path, this variable will contain the name of that file.

<InputFilepath>

If <Title> contains a complete file path, this variable will contain the folder name. If this variable is used for the directory, all files will be saved in the same directory as the printed file.

Note

Only some applications (e.g. Autocad or Irfanview) are passing the complete filename. That is why this token should not be set without checking your application.

<OutputFilenames>

Inserts the output filename(s). This token is parameterizable. You can define, how to separate multiple output files. <OutputFilenames:Format>

Samples:

  • <OutputFilenames:,> Separates multiple output files with a comma.
  • <OutputFilenames:\r\n> Separates the filenames with a wordwrap (new line for each file).

<OutputFilepath>

Inserts the target directory for the created output files.

<PrinterName>

Inserts the name of the printer, typically “PDFCreator”.

<SessionID>

Inserts the ID of the Windows client session. This is useful on Windows Terminal Servers to distinguish the sessions.

<PrintJobName>

Inserts the original document title from the print job.

<Title>

Inserts the profile settings title template with replaced tokens.

<UserName>

Inserts the username of the currently logged in user account. (This is not necessarily the user/author, who launched the print job. That would be the token <PrintJobAuthor>.)